import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from "axios"

Vue.prototype.$get = axios.get;
Vue.prototype.$post = axios.post;

Vue.config.productionTip = false

// 添加element
import Element from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(Element);

// 过滤特殊字符
Vue.prototype.validSe = function (value, number = 255) {
  value = value.replace(/[`～*~!@#$%^&*()_\-+=<>?:"{}|,/;'\\[\]·~！@#￥%……&*（）——\-+={}|《》？：“”【】、；‘’，。、]/g, '').replace(/\s/g, "");
  if (value.length >= number) {
    this.$message({
      type: "warning",
      message: `输入内容不能超过${number}个字符`
    });
  }
  return value;
};
const Bus = new Vue()
Vue.prototype.bus=Bus

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
